﻿@using GlobalResources
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Constants
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.SimInformationViewModel

<header class="header_grid">
    <a href="#" id="deviceExplorer_CellInformationBack" class="details_grid__button_back grid_subheadhead_detail">@Strings.Actions</a>
</header>

<section class="details_grid_general">
    @Html.Partial("_CellularActions", Model)
    <br />
</section>

<header class="header_grid">
    <h3 class="grid_subheadhead_detail">@Strings.SimInformationBackText</h3>
    <a id="editCellularInformation" class="link_grid_subheadhead_detail">Edit</a>
    <a id="saveCellularInformation" class="link_grid_subheadhead_detail" style="display: none;">Save</a>
    <a id="cancelEditCellularInformation" class="link_grid_subheadhead_detail" style="display: none;">Cancel</a>
</header>

@Html.HiddenFor(model => model.ApiRegistrationProvider, new { id = "apiRegistrationProvider" })

<section class="details_grid_general">
    @switch (Model.ApiRegistrationProvider)
    {
        case ApiRegistrationProviderTypes.Jasper:
        {
            @Html.Partial("_CellularInformationJasper", Model)
            break;
        }
        case ApiRegistrationProviderTypes.Ericsson:
        {
            @Html.Partial("_CellularInformationEricsson", Model)
            break;
        }
    }
    @switch (Model.ApiRegistrationProvider)
    {
        case ApiRegistrationProviderTypes.Jasper:
            {
                <div class="provider_info_textjasper_info_text details_grid_margin">@Strings.SimInformationInfoTextJasper</div>
                break;
            }
        case ApiRegistrationProviderTypes.Ericsson:
            {
                <div class="provider_info_text details_grid_margin">@Strings.SimInformationInfoTextEricsson</div>
                break;
            }
    }
</section>

<script>
    $(function () {
        IoTApp.CellularInformation.init();
    });
</script>